/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package redireccionIFrame;

import controladores.*;
import dominio.login;
import org.springframework.web.servlet.mvc.Controller;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
 *
 * @author Alith
 */
public class RedireccionConsulSesion implements Controller{
    protected final Log logger = LogFactory.getLog(getClass());
    private login objLogin = new login();
    @Override
    public ModelAndView handleRequest(HttpServletRequest hsr, HttpServletResponse hsr1) throws Exception {
        logger.info("Returning consultarSesion view");
        String now = (new Date()).toString();
        logger.info("Returning consultarSesion view with " + now);
        Map<String, Object> myModel = new HashMap<String, Object>();
        myModel.put("now", now);
        //myModel.put("login", this.objLogin.getUsuario());
        return new ModelAndView("consultarSesion", "model", myModel);
    }

    public void setLogin(login logIn) {
        this.objLogin = logIn;
    }
}
